<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="java.util.*"%>
<%@page import="com.sinodata.bsm.center.user.UserUtil"%>
<%@page import="org.springframework.jdbc.core.JdbcTemplate"%>
<%@page import="com.sinodata.bsm.center.util.spring.SpringContextHolder"%>
<%@page import="java.text.SimpleDateFormat"%>
<%
//查看是否要弹出签到页面
String currentUid = UserUtil.getInstance().getCurrentUserId();
String uid = request.getParameter("uid");
JdbcTemplate jt = SpringContextHolder.getBean(JdbcTemplate.class);
String sql="select * from (select * from sign where userid = '"+currentUid+"' order by id desc) where rownum < 2 order by id asc";
List objs =jt.queryForList(sql);
Iterator it=objs.iterator();
boolean flag=false;
if(objs.size()==0){
    flag=true;
}
while(it.hasNext()){
	HashMap map=(HashMap)it.next();
	java.sql.Timestamp time=(java.sql.Timestamp)map.get("signtime");
	if(time.getTime()+30*60*1000 <new java.util.Date().getTime()){
	     flag= true;
	 }
}
//System.out.println(flag);
response.setCharacterEncoding("utf-8");// 设置字符集编码
response.setContentType("text/html;charset=utf-8");
response.getWriter().write(flag ? "1":"0");
response.getWriter().flush();
%>

